ARCH_QUERY=$(shell uname -m)
ifeq ($(ARCH_QUERY),i686)
SNIPER_TARGET_ARCH = ia32
else
ifeq ($(ARCH_QUERY),x86_64)
SNIPER_TARGET_ARCH ?= intel64
#SNIPER_TARGET_ARCH = ia32
else
$(error Unknown target arch: $(ARCH_QUERY))
endif
endif


# where Pin is unzipped to
PIN_HOME ?= $(SIM_ROOT)/pin_kit


CC ?= gcc
CXX ?= g++


ifneq ($(DEBUG_SHOW_COMPILE),)
  SHOW_COMPILE=1
  MAKE_QUIET=
  _MSG=@echo >/dev/null
  _CMD=
else
  SHOW_COMPILE=
  MAKE_QUIET=--quiet
  _MSG=@echo
  _CMD=@
endif

ifneq ($(DEBUG),)
  OPT_CFLAGS = -O0 -g
else
  OPT_CFLAGS = -O2 -g
endif
